import xFetch from './xFetch';

export async function getHiveInfo() {
  return xFetch('/api/hive/getHiveInfo', {
    method: 'GET',
    headers: {
      'Accept': 'application/json',
      'Content-Type': 'application/json',
    }
  }).then(function (res) {
    return res.json();
  })
}

export async function getSubInfo(username) {
  return xFetch('/api/subject/' + username + '/subInfo', {
    method: 'GET',
    headers: {
      'Accept': 'application/json',
      'Content-Type': 'application/json',
    }
  }).then(function (res) {
    return res.json();
  })
}


